<template>
	<u-navbar :title="title" title-color="#ffffff" :background="background" back-icon-color="#ffffff" height="50" :custom-back="back">
		<view slot="right">
			<slot></slot>
		</view>
	</u-navbar>
</template>

<script>
	export default {
		data() {
			return {
				background: {
					backgroundImage: 'linear-gradient(to right, #FF6801, #FF9832)'
				}
			}
		},
		props: {
			title: {
				type: String,
				default: ''
			}
		},
		methods: {
			back() {
				this.$emit('backSuccess')
				// #ifdef H5
				window.history.back()
				// #endif
				// #ifdef APP-PLUS
				uni.navigateBack()
				// #endif
			}
		}
	}
</script>

<style scoped>
	>>>.u-icon--right {
		background: #ff9832;
		border-radius: 50%;
		width: 56rpx;
		height: 56rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 20rpx;
	}
	/* >>>.u-navbar-placeholder {
		height: 50rpx !important
	} */
</style>
